package jwj8508.swing.outline;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public class J07_HelloSwingActionListener implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent e) {
		// 이벤트를 발생시킨 대상 구분
		//System.out.println(e.getActionCommand());
		System.out.println(e.getSource());
		switch(e.getActionCommand()) {
			case "new":
				JOptionPane.showMessageDialog(null, "뉴루루루뉴루루뉴뉴루");
				break;
			case "open":
				JOptionPane.showMessageDialog(null, "열려라 참깨");
				break;
			case "close":
				JOptionPane.showMessageDialog(null, "으잌ㅋㅋㅋ");
				break;
			case "exit": System.exit(0); break;
		}
		
	}

}
